/**
 * author: zhangwenhui
 * 组件调用说明
 * @内容显示index索引 与 Tab的激活Index 关联
 */
<template>
  <div>
    <div>
      <tab :line-width=2 active-color='#fc378c' v-model="index">
        <tab-item class="vux-center" v-for="(item, index) in tabsList" :key="index">{{item}}</tab-item>
      </tab>
      <div class="" v-for="(item, i) in dataList" v-show="index === i" >
        <div v-for="(list, index) in item[i]"> {{ i }} </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['tabs', 'listItem'],
  data () {
    return {
      index: 0
    }
  },
  computed: {
    tabsList () {
      return this.tabs
    },
    dataList () {
      return this.listItem
    }
  }
}
</script>
